package com.project.entity.sys;

import java.util.Date;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.UpdateTimestamp;

import com.project.dao.annotation.Like;

/**
 * 系统常量
 *@author 
 */
@Entity
@Table(name="S_CONSTANT")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class SysConstant extends BaseEntity  {

	private static final long serialVersionUID = 1L;
	
	@Column(name = "code", length = 50)
	@Like
	private String code;
	
	@Column(name = "name", length = 50)
	@Like
    private String name;
	
	@Column(name = "value", length = 100)
    private String value;
	
	@CreationTimestamp
	@Column(name = "create_time", length = 19)
	private Date createTime;		//创建时间
	
	@UpdateTimestamp
	@Column(name = "update_time", length = 19)
	private Date updateTime;		//更新时间
	
	@Column(name = "create_user", length = 20)
	private String createUser;
	
	@Column(name = "updatte_user", length = 20)
	private String updateUser;
	
	@Transient
	private List<SysConstant> sysConstantList;
	
	
	public List<SysConstant> getSysConstantList() {
		return sysConstantList;
	}

	public void setSysConstantList(List<SysConstant> sysConstantList) {
		this.sysConstantList = sysConstantList;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public String getCreateUser() {
		return createUser;
	}

	public void setCreateUser(String createUser) {
		this.createUser = createUser;
	}

	public String getUpdateUser() {
		return updateUser;
	}

	public void setUpdateUser(String updateUser) {
		this.updateUser = updateUser;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}	
}
